<%@page import="com.cfxy.model.User"%>
<%@page import="com.cfxy.model.Message"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>显示所有</title>
</head>
<body>
	<%-- <%User u =(User)request.getSession().getAttribute("uuser");%> <%=u.getUsername() %> --%>
	<%List<Message> list = (List<Message>)request.getAttribute("messagelist");%>
	<% request.setAttribute("ctx",request.getContextPath());%>
	<div>用户名:${uuser.username}	</div>
	<div><a href="${ctx}/messagemanager?funcation=logout">注销</a></div>
	<div  align="center">
		<div align="center"   >
			<p align="center"; style="font-size:40px;">留言记录</p>
			<a href="/guestbook1/Message/GuestBook.jsp" align="center"; style="font-size:15px;">新增留言</a>
		</div>
		<%for(Message e:list){
		%>
			<div align="left" style="border:1px solid #000;background-color:;width:420px;padding:10px;">
			<p>留言人：<%=e.getName() %></p>
			<p>标题：<%=e.getTitle()%></p>
			<p>内容：<%=e.getContent()%></p>
			</div>
			<div style="height:50px;width:420px;">
			<a href="${ctx}>/messagemanager?funcation=delete&id=<%=e.getId()%>">删除</a>
			</div>
		<%	
		} 
		%>
	
	</div>
</body>
</html>
